{%set volume_pairlist = '{
            "method": "VolumePairList",
            "number_assets": 20,
            "sort_key": "quoteVolume",
            "min_value": 0,
            "refresh_period": 1800
        }' %}
{
    "max_open_trades": {{ max_open_trades }},
    "stake_currency": "{{ stake_currency }}",
    "stake_amount": {{ stake_amount }},
    "tradable_balance_ratio": 0.99,
    "fiat_display_currency": "{{ fiat_display_currency }}",
    "timeframe": "{{ timeframe }}",
    "dry_run": {{ dry_run | lower }},
    "cancel_open_orders_on_exit": false,
    "unfilledtimeout": {
        "buy": 10,
        "sell": 30,
        "unit": "minutes"
    },
    "bid_strategy": {
        "price_side": "bid",
        "ask_last_balance": 0.0,
        "use_order_book": true,
        "order_book_top": 1,
        "check_depth_of_market": {
            "enabled": false,
            "bids_to_ask_delta": 1
        }
    },
    "ask_strategy": {
        "price_side": "ask",
        "use_order_book": true,
        "order_book_top": 1
    },
    {{ exchange | indent(4) }},
    "pairlists": [
        {{ '{"method": "StaticPairList"}' if exchange_name == 'bittrex' else  volume_pairlist }}
    ],
    "edge": {
        "enabled": false,
        "process_throttle_secs": 3600,
        "calculate_since_number_of_days": 7,
        "allowed_risk": 0.01,
        "stoploss_range_min": -0.01,
        "stoploss_range_max": -0.1,
        "stoploss_range_step": -0.01,
        "minimum_winrate": 0.60,
        "minimum_expectancy": 0.20,
        "min_trade_number": 10,
        "max_trade_duration_minute": 1440,
        "remove_pumps": false
    },
    "telegram": {
        "enabled": {{ telegram | lower }},
        "token": "{{ telegram_token }}",
        "chat_id": "{{ telegram_chat_id }}"
    },
    "api_server": {
        "enabled": {{ api_server | lower }},
        "listen_ip_address": "{{ api_server_listen_addr | default("127.0.0.1", true) }}",
        "listen_port": 8080,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "{{ api_server_jwt_key }}",
        "CORS_origins": [],
        "username": "{{ api_server_username }}",
        "password": "{{ api_server_password }}"
    },
    "bot_name": "freqtrade",
    "initial_state": "running",
    "forcebuy_enable": false,
    "internals": {
        "process_throttle_secs": 5
    }
}
